const app = require('./test/10jest');

test('sum(1, 2)=3:', () => {
    expect(app.sum(1, 2)).toBe(3);
});

test('obj add key:', function() {
    let obj = {
        name: 111
    };
    console.log('test---setObj:', obj);
    expect(app.setObj(obj,'age', 18)).toEqual({name: 111, age: 18});
});

test('对象赋值', () => {
    const data = {one: 1};
    data['two'] = 2;
    expect(data).toEqual({one: 1, two: 2});
  });